home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c,comp.os.ms-windows.programmer.win32
- Subject: Re: How can I check whether I file exists in a multi-user environment?
- Date: Tue, 02 Apr 96 12:17:22 GMT
- Organization: none
- Message-ID: <828447442snz@genesis.demon.co.uk>
- References: <4jh4tl$t4c_002@chem.uva.nl> <Dp1oM8.Cns@iquest.net> <4jjn1d$clu@solutions.solon.com> <Dp6sqL.Buz@iquest.net> <4jq0d3$9pd@solutions.solon.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4jq0d3$9pd@solutions.solon.com>
- seebs@solutions.solon.com "Peter Seebach" writes:
-
- >In article <Dp6sqL.Buz@iquest.net>, Doug Miller <dlmiller@iquest.net> wrote:
- >>seebs@solutions.solon.com (Peter Seebach) wrote:
- >>>The reason this is a poor solution is that it doesn't test for existance,
- >>>it tests for accessibility.
- >
- >>You should check your facts more carefully. You evidently are unfamiliar
- >>with the behavior of access( ). It is defined thusly:
- >
- >It isn't defined at all, except by various external standards.
- >
- >POSIX defines it one way.
-
- And in such a way that you should never use access() unless you know what
- SETUID and SETGID mean and how they affect the operation of access(). Use
- stat(), or indeed fopen(), instead.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-